﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace 基于WPF的电缆采样数据分析系统.Views.Settings
{
    /// <summary>
    /// SysSetUC.xaml 的交互逻辑
    /// </summary>
    public partial class SysSetUC : UserControl
    {
        public SysSetUC()
        {
            InitializeComponent();


            // 当前登录账号为管理员，生成邀请码模块显示，当前登录账号为普通用户，生成邀请码模块隐藏
            if (GlobalVariableEdit.CurrentUserInfo.GradeId == 1)
            {
                InvitationCodeBox.Visibility = Visibility.Visible;
                UserInfoTable.Visibility = Visibility.Visible;
                NormalUserInfo.Visibility = Visibility.Collapsed;
                
            }
            else if (GlobalVariableEdit.CurrentUserInfo.GradeId == 2)
            {
                InvitationCodeBox.Visibility = Visibility.Collapsed;
                UserInfoTable.Visibility = Visibility.Collapsed;
                NormalUserInfo.Visibility = Visibility.Visible;
            }
        }
    }
}
